package cn.com.bod.fas.common.service.feign.impl;

import cn.com.bod.fas.common.constant.enumconst.ResultCodeEnum;
import cn.com.bod.fas.common.model.message.WebLogMsgVo;
import cn.com.bod.fas.common.model.vo.WebLogVo;
import cn.com.bod.fas.common.service.feign.FeignCommonAuditService;
import cn.com.bod.fas.common.utils.ResultUtil;
import cn.com.yusys.yusp.commons.web.rest.dto.ResultDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @description 审计服务Feign接口熔断实现
 * @author chenyuanxian
 * @date 2019年10月12日 20:35:12
 * @version 1.0.0
 * @Copyright (c) scfhdt
 */
//@Component
@Slf4j
@RequestMapping("fallback/feign/audit")
public class FeignCommonAuditServiceImpl implements FeignCommonAuditService {

    @Autowired
    private ResultUtil resultUtil;

    @Override
    public ResultDto sendWebLogToRabbit(WebLogMsgVo<WebLogVo> webLogMsgVo) {

        log.info("FeignAuditService.sendWebLogToRabbit被熔断");
        return resultUtil.error(ResultCodeEnum.HYSTRIX_ERROR);
    }
}
